import message from './xtx-message.vue'

import { createVNode, render } from 'vue'
const body = document.body
const bigmes = createVNode('div', { class: 'xtx-message-big' })
render(bigmes, body)
export default (type, text) => {
  const mes = createVNode(message, { type, text })
  let time = ''
  render(mes, bigmes.el)
  clearTimeout(time)
  // console.log(mes, bigmes)
  time = setTimeout(() => {
    render(null, bigmes.el)
  }, 2000)
}
